package com.tiancheng.trade.settlement.model.settlement;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tiancheng.trade.settlement.model.base.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Auther: liudong
 * @Date: 2024/3/30 17:52
 * @Param ${tags}
 * @Description:
 */
@Getter
@Setter
@ToString
@TableName("payment_order")
public class PaymentOrder extends BaseEntity {

    /**
     * 渠道支付订单号
     */
    private String flowId;

    /**
     * 银行支付流水
     */
    private String payChannelOrderid;

    /**
     * 交易类型：订单类型：pay 支付，refund 退款
     */
    private String transactionType;

    /**
     * 交易时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payTime;

    /**
     * 交易金额
     */
    private Integer payAmount;
    /**
     * 订单金额
     */
    private Integer orderAmount;

    /**
     * 结算金额
     */
    private Integer settlementAmount;
    /**
     * 手续费
     */
    private Integer serviceCharge;
    /**
     * 优惠金额
     */
    private Integer discount;

    /**
     * 通道费率
     */
    private BigDecimal rate;


    /**
     * 对账状态（finish-已对账，wait-待对账）
     */
    private String checkStatus;

    /**
     * 对账时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime reconciliationTime;

}
